#include "iostream"
#include <bits/stdc++.h>
using namespace std;
int DengCha(int n){
    if(n==1)
        return 1;
    return DengCha(n - 1) + 3;
}
int main(){
    int n;
    cin >> n;
    cout << DengCha(n);
}